# -*- coding: utf-8 -*-
# @Time    : 2019/7/22 20:26
# @Author  : Weymouth
# @Email   : 261229090@qq.com
# @File    : login.py
# @Software: PyCharm
# ---------------------------------------------------

_user = "wey"
_password = "abc123"


# for i in range(3):
#     username = input("username:")
#     password = input("password:")
#     if username == _user and password == _password :
#         print("welcome %s login..." %_user)
#         break
#     elif i < 2:
#         print("Invalid username or password !")
#     else:
#         print("user is locked !")
#
# else:
#     print("Pelease call 123456 !")

# _user = "wey"
# _password = "abc123"
#
passed_authentication = False

for i in range(3):
    username = input("username:")
    password = input("password:")
    if username == _user and password == _password:
        print("welcome %s login..." % _user)
        passed_authentication = True
        break
    elif i < 2:
        print("Invalid username or password !")
    else:
        print("user is locked !")

if not passed_authentication:
    print(" Please call 123456 !")


# for i in range(100):
#     if i > 70 or 50 > i:
#         print(i)

# for i in range(1, 101, 2):  #2 为步长
#     print("loop:", i)

# for i in range(1, 101):
#     if i % 2 == 1:
#         print("loop:", i)

# _user = "wey"
# _password = "abc123"
#
# username = input("username:")
# password = input("password:")
#
# if username == _user and password == _password :
#     print("welcome %s login..." %_user)
# else:
#     print("Invalid username or password !")